container: Remove reallocate_redraws
authorTimm Bäder <mail@baedert.org>
Wed, 19 Oct 2016 19:02:09 +0000 (21:02 +0200)
committerTimm Bäder <mail@baedert.org>
Thu, 20 Oct 2016 18:12:05 +0000 (20:12 +0200)
docs/reference/gtk/gtk4-sections.txt
gtk/gtkcontainer.c
gtk/gtkcontainer.h
gtk/gtkwidget.c

index 72091a924e2a08ac6d8ace43bef19b7a68561cf6..e0988131ba9873839b609f74929cff70c1ce6902 100644 (file)
@@ -900,7 +900,6 @@ gtk_container_check_resize
 gtk_container_foreach
 gtk_container_get_children
 gtk_container_get_path_for_child
-gtk_container_set_reallocate_redraws
 gtk_container_get_focus_child
 gtk_container_set_focus_child
 gtk_container_get_focus_vadjustment
index 95f85eafaea728453a3d393f3499b5ef07fd958c..85fc62b1d18835ae1f4f8dad8adde1e274b6809d 100644 (file)
@@ -281,7 +281,6 @@ struct _GtkContainerPrivate
   guint resize_handler;
 
   guint has_focus_chain    : 1;
-  guint reallocate_redraws : 1;
   guint restyle_pending    : 1;
   guint request_mode       : 2;
 };
@@ -1603,7 +1602,6 @@ gtk_container_init (GtkContainer *container)
   priv = container->priv;
 
   priv->focus_child = NULL;
-  priv->reallocate_redraws = FALSE;
 }
 
 static void
@@ -1706,27 +1704,6 @@ gtk_container_remove (GtkContainer *container,
   g_object_unref (container);
 }
 
-/**
- * gtk_container_set_reallocate_redraws:
- * @container: a #GtkContainer
- * @needs_redraws: the new value for the container’s @reallocate_redraws flag
- *
- * Sets the @reallocate_redraws flag of the container to the given value.
- *
- * Containers requesting reallocation redraws get automatically
- * redrawn if any of their children changed allocation.
- *
- * Deprecated: 3.14: Call gtk_widget_queue_draw() in your size_allocate handler.
- **/
-void
-gtk_container_set_reallocate_redraws (GtkContainer *container,
-                                      gboolean      needs_redraws)
-{
-  g_return_if_fail (GTK_IS_CONTAINER (container));
-
-  container->priv->reallocate_redraws = needs_redraws ? TRUE : FALSE;
-}
-
 static gboolean
 gtk_container_needs_idle_sizer (GtkContainer *container)
 {
@@ -3359,12 +3336,6 @@ gtk_container_propagate_draw (GtkContainer *container,
   cairo_restore (cr);
 }
 
-gboolean
-_gtk_container_get_reallocate_redraws (GtkContainer *container)
-{
-  return container->priv->reallocate_redraws;
-}
-
 /**
  * gtk_container_get_path_for_child:
  * @container: a #GtkContainer
index aa59f4f2739d75f990abb9d5ba25974c674bf54a..37af1ea1985b8feeff758b8b0aadcdaa9f733eb3 100644 (file)
@@ -157,9 +157,6 @@ void     gtk_container_unset_focus_chain (GtkContainer  *container);
 
 /* Widget-level methods */
 
-GDK_DEPRECATED_IN_3_14
-void   gtk_container_set_reallocate_redraws (GtkContainer    *container,
-                                            gboolean         needs_redraws);
 GDK_AVAILABLE_IN_ALL
 void   gtk_container_set_focus_child      (GtkContainer     *container,
                                            GtkWidget        *child);
index 4a27e36bee36f90439a6e2edd11d14135d642378..df6c2bd3c9bffc0bbbc216113c7c6520e12a6264 100644 (file)
@@ -5599,14 +5599,6 @@ gtk_widget_size_allocate_with_baseline (GtkWidget     *widget,
        }
     }
 
-  if ((size_changed || position_changed || baseline_changed) && priv->parent &&
-      _gtk_widget_get_realized (priv->parent) && _gtk_container_get_reallocate_redraws (GTK_CONTAINER (priv->parent)))
-    {
-      cairo_region_t *invalidate = cairo_region_create_rectangle (&priv->parent->priv->clip);
-      gtk_widget_invalidate_widget_windows (priv->parent, invalidate);
-      cairo_region_destroy (invalidate);
-    }
-
 out:
   if (priv->alloc_needed_on_child)
     gtk_widget_ensure_allocate (widget);